<form class="layui-form">
    <div class="layui-form-item">
        <label class="layui-form-label">科目：</label>
        <div class="layui-input-inline">
            <select name="interest" lay-filter="aihao">
            <option value=""></option>
            <option value="0">自己填</option>
            <option value="1">自己填</option>
        </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">老师:</label>
        <div class="layui-input-block">
        	<div class="layui-form-mid layui-word-aux"><span class="p-r20">从学校老师中，未添加老师请先添加老师</span><a class="layui-btn layui-btn-small layui-btn-normal">添加老师</a></div>
            
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">课时:</label>
        <div class="layui-input-inline">
            <input name="title" lay-verify="title" autocomplete="off" placeholder="请输入..." class="layui-input" type="text">
        </div>
        <div class="layui-form-mid layui-word-aux">课时</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">上课时间:</label>
        <div class="layui-input-inline">
          <input class="layui-input" placeholder="开始日" id="LAY_demorange_s">
        </div>
        <div class="layui-input-inline">
          <input class="layui-input" placeholder="截止日" id="LAY_demorange_e">
        </div>
    </div>
</form>
<script>
layui.use('laydate', function(){
	var laydate = layui.laydate;
	var start = {
		min: laydate.now()
		,max: '2099-06-16 23:59:59'
		,istoday: false
		,choose: function(datas){
		  end.min = datas; //开始日选好后，重置结束日的最小日期
		  end.start = datas //将结束日的初始值设定为开始日
		}
	};
	
	var end = {
		min: laydate.now()
		,max: '2099-06-16 23:59:59'
		,istoday: false
		,choose: function(datas){
		  start.max = datas; //结束日选好后，重置开始日的最大日期
		}
	};
	
	document.getElementById('LAY_demorange_s').onclick = function(){
		start.elem = this;
		laydate(start);
	}
	document.getElementById('LAY_demorange_e').onclick = function(){
		end.elem = this
		laydate(end);
	}
});
</script>